﻿using Microsoft.Extensions.Options;
using System.Collections.Generic;
using Volo.Abp.DependencyInjection;
using Xms.Abp.Caching;
using Xms.Abp.MultiTenancy;

namespace TenantManagement;

public class TenantCacheContext : CacheContext<TenantCacheContext>, ITenantCacheContext, ITransientDependency
{
    public TenantCacheContext(IAbpLazyServiceProvider lazyServiceProvider, IOptions<DistributedCacheProviderOptions> optionsAccessor, IEnumerable<ICacheProvider<TenantCacheContext>> cacheProviders)
        : base(lazyServiceProvider, optionsAccessor, cacheProviders)
    {
    }

    public IKeyValueCache<TenantData> Tenants => KeyValue<TenantData>();
}
